<link rel="stylesheet" href="../addons/jy_merch/css/mobile.css?v=1">
<div class='fui-page fui-page-current'>
    <div class="fui-header fui-header-success" style="background: {{main.syscolor||'#05c175'}};">
        <div class="fui-header-left">
            <a class="back" ng-click="goback();"></a>
        </div>
        <div class="title">商户设置</div>
        <div class="fui-header-right"></div>
    </div>
    <div class='fui-content'>
	<div style="padding:0.5rem;">
        <div class="fui-list-group">
            <div class="fui-list">              
                <div class="fui-list-inner">
                    <div class="title">商户logo</div>
                </div>
				<a class="fui-list-media" ng-if="pagedata.post.logo">
					<img class="round" src="{{tomedia(pagedata.post.logo) || '../core/resource/images/nopic.jpg'}}" />
				</a>
				<a class="fui-list-media weui_uploader_input_wrp">
					<span class="weui_uploader_input" ng-click="image(pagedata.post,'logo')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple=""></span>
				</a>
            </div>
        </div>
		
       <div class="fui-cell-group">
            <div class="fui-cell must ">
                <div class="fui-cell-label">商户名称</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" id="merchname" placeholder="商户名称" ng-model="pagedata.post.merchname"/></div>
            </div>
            <div class="fui-cell ">
                <div class="fui-cell-label">简单介绍</div>
                <div  class="fui-cell-info"><textarea id="desc" ng-model="pagedata.post.desc" placeholder="简单介绍下商户"></textarea></div>
            </div>
        </div>
		<div class="fui-cell-group">
            <div class="fui-cell must ">
                <div class="fui-cell-label">账户名</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" id="uname" placeholder="账户名" ng-model="pagedata.post.uname"/></div>
            </div>
            <div class="fui-cell ">
                <div class="fui-cell-label">账户密码</div>
                <div  class="fui-cell-info"><input type="password" class="fui-input" id="upass" placeholder="账户密码" ng-model="pagedata.post.upass"/></div>
            </div>
        </div>
        <div class="fui-cell-group">
            <div class="fui-cell must ">
                <div class="fui-cell-label">联系人</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" id="realname" placeholder="您的称呼" ng-model="pagedata.post.realname"></div>
            </div>
            <div class="fui-cell must">
				<div class="fui-cell-label">手机号</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="pagedata.post.mobile" /></div>
				<div ng-if="pagedata.pluginset.is_smscode==1" class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="tool.mobile_code(pagedata.post.mobile,'smscode')" id="smscode">获取验证码</a></div>
			</div>
			<div ng-if="pagedata.pluginset.is_smscode==1" class="fui-cell must ">
				<div class="fui-cell-label ">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.post.smscode" /></div>
			</div>
            <div class="fui-cell-tip">请仔细填写联系方式，保证我们能尽快联系到您~</div>

        </div>
		<div ng-if="pagedata.post.diyfields.length>0" class="weui_cells_title">其他内容</div>
		<div ng-include="sys_html('common/_diyform',true)"></div>
        <div class="btn btn-success block" ng-click="post(pagedata.post,'post')" id="btn-submit">保存设置</div>
    </div>
    </div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script type="text/javascript">
	window.scope.location(function(res){
			console.log(res)
			scope.$evalAsync(function(){
				scope.pagedata.post.lat_lng=scope.pagedata.post.lat_lng?scope.pagedata.post.lat_lng:res.lat_lng
				scope.pagedata.post.address = res.address;
			});
	});

</script>